Apache Havoc
Strategy Guide

Chapter [1][2][3][4][5][6] 7

<Previous Chapter   |  Contents>

 

thumb_wireframe.gif (5523 bytes) CHAPTER 7
simulation mechanics

 

7.1 Command Line Parameters

 

Shortcuts

Apache Havoc is customizable to some degree by the user. Some flight model, visual and most communication elements can be altered by passing command line parameters when launching the game. This section includes a full list of some documented and undocumented ones (which can now be considered documented).

Command Line parameters can be entered into a DOS box or program shortcut. Several Windows shortcuts to Apache Havoc with different options included in the Target field (see figure 8-1 below) can be made and re-named to switch between different options.

command_line_properties.jpg (33439 bytes)

figure 8.1: Shortcut Properties - command line switches in Target box

Environment Variable

As an alternative to using command line or shortcuts options, you can specify the commands you want with the APACHE_HAVOC environment variable and SET command.

For example:

SET APACHE_HAVOC=/cgs:1 /cig:1 /cbar:1000

For more information on using command lines and environment variables, please refer to your computers disk operating system manual or Windows95 user manual.

 

Apache Havoc version 1.1e Parameters

Category – Communications
Switch Meaning Description
/ccrs:n comms_connection_receive_size n = Initial guess of campaign data size. If campaign data is larger then this can slow things down (default = 200k)
/cdrs:n comms_data_record_size similar to above…
/cpbs:n comms_pack_buffer_size similar to above…
/cgs:1 comms_guaranteed_send Force the comms to use DirectPlay guaranteed send instead of its own.
n = 1 (turn on) n = 0 (turn off - default)
/crls:n comms_resend_list_size n = Packet history list size, increase if client keeps getting kicked out by server (default = 1000)
/crl:n comms_rerequest_limit n = number of times a client can re-request the same packet. Increase this for poor connections (default = 10)
/cpt:n comms_packet_timer n = time delay in seconds the comms will wait for a packet before re-requesting it. (default = 5s)
/crt:n comms_resend_timeout n = time comms will wait before assuming re-requested packets was lost
(default = 2s)
/mur:n max_update_rate n = network frame rate for a server, n/a for a client
(default = 5fps for TCP/IP, 15fps for IPX)
/cig:1 comms_interpolate_gunships program will interpolate a players helicopter position for smoother visuals
n = 0 (off / default)  n = 1 (on)
/cvc:1 comms_validate_connection removes dead player husks when client crashes
n = 0 (off / default)  n = 1 (on)
/cto:n comms_time_out the amount of time to wait before removing dead player husks
n = 0 (off / default)  n = 1 (on)
     
Category – Visual
Switch Meaning Description
/cbar:n city_block_approximation_range n = distance in meters that city blocks resolve from their simple form to complex form (default = 500 meters)
/mfr:n max_frame_rate n = Max visual frame rate, (defaults = 30)
     
Category – Flight Dynamics
Switch Meaning Description
/drbs:n dynamics_retreating_blade_stall n = floating point scaling factor for RBS effect (default = 1.0)
/drv:n dynamics_rudder_value n = scaling factor for drag on tail rotation (default = 1.0)
/dra:n dynamics_rudder_acceleration n = scaling factor for tail rotation acceleration (default = 0.8)
/drd:n dynamics_main_rotor_drag n = scaling factor for drag caused by main rotor (default = 1.0)
/dtrd:n dynamics_tail_rotor_drag n = scaling factor for drag caused by tail in forward flight (default = 1.0)
/dzd:n dynamics_cyclic_dead_zone n = percentage deadzone for the cyclic (default = 0.0)
     
Category - Miscellaneous
Switch Meaning Description
/goto:1 planner_goto_button Activates "GOTO" teleport button on the campaign map.
/vfm:1 vector_flight_model Activates viewer or "UFO" flight mode.
/psr:n player_start_rank n = Start rank for new pilots
/ns no_sound Bypass soundcard, useful for tracking hardware conflicts
/pitod:n player_initial_tour_of_duty Tour Of Duty start timer value
/3dreset 3d_reset Reset screen resolution to 640x480
/dxtm directx_texture_management Should fix "unable to allocate hardware slot" error

 

Dedicated Server Options - Version 1.1d and later

Category – Dedicated Server Mode
Switch Meaning Description
/dedicated:n dedicated_server n = Switch to activates dedicated server mode
0 = On
1 = Off
/game_type:n initialisation_phase_game_type n = The type of game to host
1 = Free Flight
2 = Dynamic Missions
3 = Campaign
4 = Special
5 = Demo
/gunship_type initialisation_phase_gunship_type Dummy value that’s not important but required.
0 = Apache
1 = Havoc
/path:<path> campaign_path Path from .EXE of the theater map folder
eg ..\common\maps\map2
/filename:<file> campaign_filename The campaign (.CMP) file to use relative from the .EXE
eg campaign\cuba.cmp


 

thumb_wireframe.gif (5523 bytes) 7.2 Command Line Examples

Activate the Teleport feature

aphavoc.exe /goto:1

This enables a "GOTO" button on the campaign map. It could be considered a poor mans "skip" feature if the flying experience passes you by and you want to get to the action soonest.

 

Enabling DirectPlay Guaranteed Packet Delivery

aphavoc.exe /cgs:1

This activates the guaranteed packet delivery of DirectX, while this may introduce a little extra latency at one layer, it may reduce packet re-transmissions at a higher layer and improve performance (in theory). Your mileage may vary.

 

Dedicated Server Example

aphavoc.exe /dedicated:1 game_type:3 gunship_type:0 path:..\common\maps\map2 filename:campaign\cuba.cmp

This will start the server running the Cuban campaign. Rather than use the command line directly you could create a .BAT file or shortcut with the parameters you want.

 

thumb_ground_unit.gif (5928 bytes) 7.3 Editing Campaign Files

This section describes how to modify the campaigns in Apache Havoc. It should not be taken as a complete guide or manual but it should go some way to assist the keen hacker. This information is courtesy of Todd Gibbs at Razorworks.

Note: If altering any files causes problems with the game, either restore from backups or the original files located on the CD.

 

Directory Structure

Each campaign uses similar files but stored in their own sub-directory.


figure 7-1: Campaign Directories
Map Numbers and their Location

MAP1 is Thailand
MAP2 is Cuba
MAP3 is Georgia

 

CUBA (Map #2) as an Example

There are several files in each MAP# directory, their file extensions denote their usage:

  • CMP (campaign)
  • DEM (demo)
  • FRE (free flight)
  • SGL and SPC (single and special games).

The CMP files are  the most use for quickly changing the balance of power although some others can influence it.

 

CUBA.CMP

The CMP files are mostly self-explanatory but here is a quick run down the contents:

The attitude is not used at the moment but will be in Comanche Hokum. Its will influence the sides retaliation characteristics.

The task_generation stuff defines the type of tasks a side can create, the values after it aren't used. They use to deal with frequency, urgency and duration but never made it in.

Hardware reserves I think you can guess. During the campaign these are spawned in base "Generator Hangers". Out of these you will see helicopters and jets taxiing to the landing pads. The frequency of replacements from the reserves is defined by REGEN_FREQUENCY,  its value is defined as:

time to regen = 10 minutes / REGEN_FREQUENCY

With 1 giving a new aircraft every 10 minutes and 10 giving one every minute. You'll notice that the BLUE FORCE regen frequency is a lot lower to try and address the balance.

The actual size of the groups of tanks is defined by how big the area is that they are being placed into (clear area around the road node), but the maximum they will ever get is defined by FRONTLINE_FORCES. The default is 10 and the max is 16. You could try giving the US 12 and the CIS 6 and see what happens.... If you try 16/16 you'll probably see a large frame-rate drop, especially on Thailand (by default there is 1000 tanks already!)

From there on its all about bases (keysites) and the initial forces at them. You've pretty much worked out how the groups are built and what goes into them (from formcomp.dat and forms.dat). This will influence the war quite a bit. At the moment no ground forces are placed this way, they are either done automatically by the Frontline code or SAM/AAA placement code. I'll have a look next week and see if I can provide some help in tweaking these.

You could try placing some tanks at a base and see what happens, although the only task they would be able to pickup is 'Supply'...

I probably need to explain how the task engine works as well... everything in the world is capable of doing a task (mission). Obviously some things are more suitable for certain tasks than others. When a task is created (by either the Highlevel AI or the Retaliation engine - another subject ;) ) it goes onto an "unassigned_mission" list. This list is periodically assessed by idle groups in the world to see if there is anything for them to do. When assessing they take into account their 'suitability' values and, hopefully, a suitable match is made.

The Highlevel AI deals with planned attacks or missions, like Deep strike (not all of them) or CAP. The Retaliation engine probably creates most of the mission in the game. Each side has a Retaliation engine that is informed if anything happens, like a tank targeting a helicopter. The Retaliation engine decides if the tank should attack, hide or if it should send in some forces to help (or whatever...) and on the other side if the helicopter should attack back, run away or if it should send assistance.

 

CUBA.SID

There is also a file called CUBA.SID   This is a multi-layered PSD (Adobe PhotoShop file) that has simply been renamed. If you rename it back to CUBA.PSD and load it up you'll see that the file has a number of layers.

The layers are:

.PSD Layer Name

Description
BACKGROUND Defines the red/blue initial land held
BLUE_HOT_SPOTS defines the objective sectors (the ones you need to capture to win)
RED_HOT_SPOTS defines the objective sectors (the ones you need to capture to win)
BLUE_GROUND_WARMTH Greyscale, used by the ground forces to know which way to move,
RED_GROUND_WARMTH (Cold to warmer, White being  the warmest)
BLUE_SEA_WARMTH Not Used
RED_SEA_WARMTH Not Used

You should be able to draw on this, rename it back to CUBA.SID and see the changes... it would help a lot if you just gave the BLUE_FORCE side more land!

FORMS.DAT

FORMS.DAT contains all the campaign formations, unfortunately you can't add new formations, only alter the existing ones. I guess the easiest way to work out new formation positions is on graph paper, (that's how it was done). I don't think the Kiev and Tarawa ones are used any more so you could totally alter those (change name etc).

Here’s the complete list of available formations in case any are missing from the file:

NONE,
1,
2_ROW_LEFT,
2_ROW_RIGHT,
2_COLUMN,
2_VERTICAL,
3_ROW_LEFT,
3_ROW_RIGHT,
3_COLUMN,
3_VERTICAL,
3_VEE,
4_ROW_LEFT,
4_ROW_RIGHT,
4_COLUMN,
4_VERTICAL,
5_ROW_LEFT,
5_ROW_LEFT_LOOSE,
5_ROW_RIGHT,
5_ROW_RIGHT_LOOSE,
5_COLUMN,
5_VERTICAL,
5_VEE,
7_VEE,
9_VEE,
16_ROW_LEFT,
16_ROW_RIGHT,
16_COLUMN_LOOSE,
16_COLUMN_TIGHT,
80M_ROAD_NODE_16_TANKS,
TARAWA_HELICOPTER_LANDING_SITES,
KIEV_HELICOPTER_LANDING_SITES,

Here is the complete list of valid components:

HELICOPTER_SCOUT_GROUP,
HELICOPTER_STRIKE_GROUP,
HELICOPTER_ESCORT_GROUP,
HELICOPTER_RECON_GROUP,
HELICOPTER_MARINE_ASSAULT_GROUP,
HELICOPTER_MEDIUM_LIFT_GROUP,
HELICOPTER_HEAVY_LIFT_GROUP,
FIXED_WING_CLOSE_AIR_SUPPORT_GROUP,
FIXED_WING_MULTI_ROLE_GROUP,
FIXED_WING_CARRIER_BORNE_STRIKE_GROUP,
FIXED_WING_CARRIER_BORNE_INTERCEPTOR_GROUP,
PRIMARY_FRONTLINE_GROUP,
SECONDARY_FRONTLINE_GROUP,
HEAVY_SAM_AAA_GROUP,
LIGHT_SAM_AAA_GROUP,
INFANTRY_SAM_GROUP,
ARTILLERY_GROUP,
MLRS_GROUP,
INFANTRY_GROUP1,
INFANTRY_GROUP2,
AIRCRAFT_CARRIER_GROUP,
FRIGATE_GROUP,
LANDING_GROUP,

Placing vehicles at bases won't have the desired effect... 'landed' vehicles cannot attack until they 'takeoff'.. that applies to anything, aircraft, vehicles, ships. Around each base is a number of defined routes, one for landing, one for taking off, etc... before anything can start engaging, it must fly/drive the takeoff route.

 

CUBA.BIN

There use to be a PSD layer (like the .SID file) for the SAM/AAA placement but it was combined into the CUBA.BIN file. The composition of the bin file is binary, but it is possible to play around with it.

The bin file is split into sections. Each section will have a size and a data part. Looking through it would be too difficult to tweak values but luckily the very last section is to do with SAM/AAA placement. The section is stored as:

[number_of_sam/aaa]
[x_position]
[z_position]
[x_position]
[z_position]
...
...

So if you wrote a program that worked backwards from the end of the file, reading in 4_BYTE float values until you get to a value that looks like the 'number_of_sam/aaa' (you could calculate what the value should be). By default, the value for Cuba is 110 and Georgia is 93, that should help you locate it. Then all you need to do is alter the count and write out the new positions... the side of the SAM/AAA is determined by the sector side.

The easiest way to increase the number of SAM/AAA units is to change the formation data. The group type is:

ENTITY_SUB_TYPE_GROUP_ANTI_AIRCRAFT

And the formation is:

FORMATION_COMPONENT_LIGHT_SAM_AAA_GROUP.

 

Ground forces also get their side from the sector side info... same for the FARPs. The map is actually covered with possible FARP positions. FARPs can only exist along the frontline and as the game progresses the frontline moves, enabling new FARPs and disabling old ones. When a sector with a FARP in is captured the FARP starts to shutdown. This allows the enemy to possibly capture it and use it for itself - you'll sometimes see helicopters on FARP_RECON missions... this mission is used to enable a new FARP site.

The hotspot layers are to do with the sector_objective... there are two layers because it is possible to have different objectives for each side. You should find that if you alter the blue hotspot layer and run the game, blue force objective sectors will change... although not the count on the status screen (that's done in the script file so if you change one, don't forget to change the other).

CAMPAIGN.POP

The .POP files are used to create keysites without the .BIN file. The main campaigns (cuba.cmp etc) don't use them anymore but special games do (mult3.spc). All it does is create a keysite, create the landing routes for various types (helicopter, fixed_wing, ship or routed_vehicles) and place buildings. You could build a new base using the pop file and tell the campaign file to load it... have a look at mult3.spc where it specifies the filename mult3.pop.

Completion criteria for the campaigns (or any game) can be any of the following... you can see from the .CMP file how they are used. The game checks every couple of seconds to see if all the criteria has been fulfilled, if they have the game ends with the specified 'result'.

For each, here are the parameters that must be supplied:

CAMPAIGN_CRITERIA_BALANCE_OF_POWER:
GOAL
RESULT

CAMPAIGN_CRITERIA_COMPLETED_TASKS:
CAMPAIGN_CRITERIA_FAILED_TASKS:
GOAL
TYPE
RESULT

CAMPAIGN_CRITERIA_DESTROYED_ALLIED_OBJECTS:
CAMPAIGN_CRITERIA_DESTROYED_ENEMY_OBJECTS:
GOAL
TYPE
RESULT

CAMPAIGN_CRITERIA_INEFFICIENT_ALLIED_KEYSITES:
CAMPAIGN_CRITERIA_INEFFICIENT_ENEMY_KEYSITES:
GOAL
TYPE
RESULT

CAMPAIGN_CRITERIA_SURRENDERED_SIDES:
GOAL
RESULT

CAMPAIGN_CRITERIA_SECTOR_REACHED:
GOAL
X_SECTOR
Z_SECTOR
RESULT

CAMPAIGN_CRITERIA_REACHED_WAYPOINTS:
GOAL
TYPE
RESULT

CAMPAIGN_CRITERIA_TIME_DURATION:
DAYS
HOURS
MINUTES
SECONDS
RESULT

CAMPAIGN_CRITERIA_CAPTURED_SECTORS:
CAMPAIGN_CRITERIA_LOST_SECTORS:
GOAL
RESULT
CAMPAIGN_CRITERIA_ENEMY_FIRED:
GOAL
RESULT

So, for example if you wanted to make a special game in which you had to avoid being detected by the enemy but destroy their base you could use:

For blue only (no need for red criteria in this case!)

:CAMPAIGN_CRITERIA
:CRITERIA_DESTROYED_ENEMY_OBJECTS
:GOAL 1
:TYPE OBJECT_3D_LAST
:RESULT SUCCESS

:CAMPAIGN_CRITERIA
:CRITERIA_ENEMY_FIRED
:GOAL 1
:RESULT FAILURE

You could add a timer (5 minutes) with ...

:CAMPAIGN_CRITERIA
:CRITERIA_TIME_DURATION
:DAYS 0
:HOURS 0
:MINUTES 5
:SECONDS 0
:RESULT FAILURE

There are a lot of things you can do with this. There used to be a special game in which you had to hover within a big transparent sphere for a 10 seconds within a time limit... it was really quite hard. Special games are probably the best way to practice and I think will allow the most scope.

Map positions are calculated from the bottom left of the map. You can calculate the size of the map from the data in the .CMP file.

The hotspot layers are the same at the moment because both sides objective sectors are the same.... they don't have to be though... try changing blues to cover the entire map except a little bit in the middle and you'll see what I mean (hopefully!)

The warmth layers are purely used by the ground forces for when they are deciding which direction to travel. Imagine a group of tanks at a road junction with 2 directions of possible travel; the warmth map just helps the decision.

The background layer is only used to define the side of the sectors. Although other things use the sector sides to define their side.

The hotspot layers are the only ones used to set the objective sectors. So, in the blue_hotspot layer colour the whole thing in blue and see what happens in the game... you should see that the whole map is covered by objective sectors. By intelligently altering the hotspot layers you can change how difficult it is to complete a campaign (although you could just reduce the number of required objective_sectors in the cmp file !)

The only reason the red and blue layers are the same is to make the two sides appear to battle for sectors... if they were different blue would go off in one direction to capture its sectors while red would concentrate on getting its. Having then on top of one another makes each side try and capture the same sector. If that makes sense !?

The easiest way to add campaigns is to copy the cmp file, changing the titles to New Cuban Crisis (or whatever). Then the game will pick them up as different campaigns.

 

In the FORMCOMP.DAT file (and all script files) the double slash // designates a comment line.

Looking through the .DAT file it is pretty straightforward.

  • The first "type" is the name of the formation_components.
  • The second "type" is the name of the formation (from forms.dat).
  • The "count" is the number of aircraft (or whatever) in the formation.
  • Then comes the group type (from the valid ones listed at the start of the section).
  • Finally the actual aircraft types, listed Blue, Red, Blue, Red etc...

The only thing to be careful of is to make sure that the "count" (x2 for Blue/Red) is the same as the number of aircraft listed.

 

thumb_wireframe.gif (5523 bytes) 7.4 Patches / Updates

All international patches and updates for Apache Havoc can be downloaded from the Razorworks site at the following URL:

http://www.razorworks.com/pages/patches_txt.htm

Latest version is 1.1e which is available for all language version from the site above. Although the patch installer says it is version 1.1d, it is in fact the correct 1.1e version.

The European patch is 4.5mb in size, all over versions are 1.5mb. This is due to the extra artwork and sound not included in the European version which was included in the original U.S release.

 

7.5 Hall Of Shame

And finally, a chance to giggle at their get-up. The cast and crew of Razorworks - the Oxford based software team responsible for Apache Havoc.


In order of tubbiness - left to right:
Matt Smith, Dave Proctor, James Morris, Todd Gibbs, Dave Lomas, Kevin Bezant, Neil Roberts
Inset: James Hobson

 


<Previous Chapter   |  Contents>